package com.leixin.demo.utlis;

import com.leixin.demo.service.UrlService;


public class ThreadRunnable implements Runnable{
    private Integer size;
    private UrlService urlService = SpringUtlis.getBean(UrlService.class);
    public ThreadRunnable(Integer size){
        this.size=size;
    }
    @Override
    public void run() {
            String url = "http://www.bibizyz8.com/index-" + size + ".html";
            try {
                urlService.getURLInfo(url, size);
            } catch (Exception e) {
                System.out.println(Thread.currentThread().getName()+":线程失败");
                e.printStackTrace();
            }

    }
}
